package 数据结构与算法.实验二;

public class Test {
    public static void main(String[] args) {
        Stack stack = new Stack();
        try{
            stack.print();
            stack.push("1");
            stack.print();
            stack.push("2");
            stack.print();
            stack.push("+");
            stack.print();
            stack.push("5");
            stack.print();
            stack.push("*");
            stack.print();
            stack.push("2");
            stack.print();
            stack.push("-");
            stack.print();
            //System.out.println(stack.pop());
            //System.out.println(stack.pop());
            //System.out.println(stack.pop());
            //System.out.println(stack.pop());
            //stack.pop();
            System.out.println(stack.peek());
        }
        catch (Exception e){
            System.out.println(e);
        }
    }
}
